package com.quanyan.user.service;

import com.quanyan.api.APIResponse;
import com.quanyan.common.Plugin.PageObj;
import com.quanyan.user.model.db.TbUser;
import com.quanyan.user.model.vo.request.ReqDynamic;
import com.quanyan.user.model.vo.request.ReqHomePage;
import com.quanyan.user.model.vo.response.*;
import com.quanyan.user.response.ReqReleaseDynamic;
import com.quanyan.user.response.RespClubDynamicInfo;

import java.util.List;
import java.util.Map;

/**
 * Created by zhang on 16/11/8.
 */
public interface UserDynamicService {

    /**
     * 获取动态
     *
     * @param reqDynamic
     * @return
     */
    APIResponse<PageObj<List<RespDynamicDetail>>> queryDynamic(ReqDynamic reqDynamic);


    /**
     * 动态详情
     * @param uid
     * @param dynamicDetailsId
     * @return
     */
    APIResponse dynamicDetail(Integer uid, Integer dynamicDetailsId);

    /**
     * 删除动态
     *
     * @param uid
     * @param dynamicDetailsId
     * @return
     */
    APIResponse deleteDynamicDetail(Integer uid, Integer dynamicDetailsId);


    /**
     * 举报
     *
     * @param uid
     * @param dynamicDetailsId
     * @return
     */
    APIResponse reportDynamic(Integer uid, Integer dynamicDetailsId);


    /**
     * 发布动态
     *
     * @param reqReleaseDynamic
     * @return
     */
    APIResponse addDynamicDetail(ReqReleaseDynamic reqReleaseDynamic);


    RespUserEntity convertTbUserToRespUserEntity(TbUser tbUser);


    /**
     * 获取首页精选动态列表
     *
     * @param pageNum
     * @param pageSize
     * @return
     */
    APIResponse<PageObj<List<NewsBaseInfo>>> getFirstNewsList(Integer pageNum, Integer pageSize, Integer uid);


    /**
     * 获取首页动态圈动态发布人
     * @param iNum
     * @return
     */
    APIResponse<List<NewsUserMan>> getFirstPageMans(Integer iNum);


    /**
     * 获取首页
     * @param reqHomePage
     * @return
     */
    APIResponse homePage(ReqHomePage reqHomePage);

    /**
     * 获取动态最新图片
     * @param currentUid
     * @param uid
     * @param latestNewsImgNum
     * @return
     */
    List<RespImgInfo> getIndexImgList(int currentUid, int uid, int latestNewsImgNum);

    /**
     * 获取用户动态总数
     * @param currentUid
     * @param uid
     * @return
     */
    int getUserNewsCount(int currentUid,int uid);

    /**
     * 更新仅自己可见动态图片
     * @return
     */
    APIResponse updateDynamicOnlyVisible();

    /**
     * 获取俱乐部推荐动态
     * @param clubIdList
     * @return
     */
    Map<Integer,RespClubDynamicInfo> getClubRecommendDynamicList(List<Integer> clubIdList);
}
